import os
import openai
from langchain_community.llms import OpenAI
from langchain.chains import LLMChain
from langchain_core.prompts import PromptTemplate

os.environ["OPENAI_API_KEY"]=os.environ["OPENAI_API_KEY_ZHIHU"]
os.environ["OPENAI_API_BASE"]=os.environ["OPENAI_API_BASE_ZHIHU"]

llm = OpenAI(model_name= "gpt-3.5-turbo",temperature=0.9)

template = '''
I want you to act as a naming consultant for new companies.
What is a good name for a company that makes {product}?
'''

prompt = PromptTemplate(input_variables=["product"],template = template)
llm_chain = LLMChain(prompt=prompt,llm=llm)

# product = "Table tennis racket"
# print(llm_chain.run(product))

products = [
    "Runnig shoes",
    "provide cryptocurrency management service to clients",
    "Chinese food in Africa",
    "cleaning service to invididual home owners"
]

print(llm_chain.run(products))